<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 

<ui:composition template="/template/mainLayout.xhtml" >
    <ui:define name="bodyContent">
    <rich:panel>
        <f:facet name="header">
			Modificacion de un Rubro        
        </f:facet>
        <h:form>
	        <h:inputHidden value="#{rubroBean.rubro.id}" />
	        <h:inputHidden value="#{rubroBean.rubro.activo}" />
	        <h:panelGrid columns="2">
	        	<h:outputText value="Nombre: " />
	        	<h:inputText id="nombre" value="#{rubroBean.rubro.nombre}" maxlength="45"/>
	        </h:panelGrid>
	        
	        <h:commandButton action="listadoRubro" value="Cancelar" />
	        <h:commandButton action="#{rubroBean.modificarRubro}" value ="Guardar"/>
	        
		</h:form>
	</rich:panel>
	
	<rich:popupPanel rendered="#{(rubroBean.modificacion )}" show="#{rubroBean.modificacion}" modal="true" moveable="false">
	<h:form>
		<f:facet name="header">
			<h:outputText value="Aviso" />
		</f:facet>
		<h:outputText value="El producto se a modificado con exito." />
		<br />
		<h:commandButton value="Aceptar" action="#{rubroBean.listadoRubro}" />
	</h:form>
	</rich:popupPanel>
	</ui:define>
</ui:composition>
</html>
